-
-
Notifications
You must be signed in to change notification settings - Fork 841
Don't suggest to start build with infinite number of threads #1087
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Thanks for the suggestion. What machine are you using? Does the build take longer with On macOS with 8 CPUs, |
Hi @hugovk. It's not so much related to my machine in particular. It's just that once all the CPU cores are used for compiling, adding more jobs generally do not improve the performance and rather tend to make it worst because of the overhead of context switches 1. It's not very much noticeable in practice, though 23. However, what is growing continuously is the RAM consumption. Each started job will consume memory, which causes a noticeable increase in overall RAM usage (finally "wasted" since an infinite number of jobs cannot run in parallel). This is not really desirable, and this is frequently related to out-of-memory problems for a beginner who is not familiar with Also I suggested Footnotes |
For the test suite, -j starts a number of parallel tests appropriate to the CPU. Since, you say, make -j does not do that, why not recommend -j# where # is appropriate for the machine? |
@terryjreedy On the same page, tests are suggested to be run with |
The following commit authors need to sign the Contributor License Agreement: |
Hi.
Just a small enhancement proposal, as I don't think calling
make
with unbounded number of threads is desirable.Using
make -j
will start "infinite" number of jobs according tomake
docs, which slows down the build and consumes too many resources.Suggesting
make -j4
seems to be a sane default, advanced users will know how to adjust it.📚 Documentation preview 📚: https://cpython-devguide--1087.org.readthedocs.build/